/*
* Description: 电源管理
*/

#ifndef POWER_MANAGER_H
#define POWER_MANAGER_H

#include "log.h"
#include <windows.h>
#include <WtsApi32.h>
#include <shlwapi.h>
#include "powrprof.h"
#include "rpc_service/sendto_host.h"

namespace GUEST {
class PowerManager {
public:
    bool Init(std::shared_ptr<WINCONTROL::SendToHost> sendToHostSharedPtr);
    void Quit();
private:
    std::string sessionName_ = "PowerManager";
    void GetSessionState(int32_t state);
    std::shared_ptr<WINCONTROL::SendToHost> sendToHost_ = nullptr;
    void SendScreenOffMessageToHost(bool flag);
};
#define POWER_MANAGER SingletonNew<GUEST::PowerManager>::GetInstance()
}  //namespace GUEST
#endif